From 893ca9937ae7bfed8c29fa9b4fe7fbcce076be08 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sun, 4 May 2008 00:32:13 +0000 Subject: [PATCH] (XDrawLine, XCreatePixmapFromBitmapData) [USE_MAC_IMAGE_IO]: Create bitmap context in native byte order. --- src/macterm.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/macterm.c b/src/macterm.c index 0023c8988a0..8886cdb565b 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -415,7 +415,11 @@ XDrawLine (display, p, gc, x1, y1, x2, y2) if (ximg->bits_per_pixel == 32) { color_space = mac_cg_color_space_rgb; - alpha_info = kCGImageAlphaNoneSkipFirst; + alpha_info = (kCGImageAlphaNoneSkipFirst +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 + | kCGBitmapByteOrder32Host +#endif + ); } else { @@ -743,7 +747,11 @@ XCreatePixmapFromBitmapData (display, w, data, width, height, fg, bg, depth) context = CGBitmapContextCreate (pixmap->data, width, height, 8, pixmap->bytes_per_line, mac_cg_color_space_rgb, - kCGImageAlphaNoneSkipFirst); + kCGImageAlphaNoneSkipFirst +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 + | kCGBitmapByteOrder32Host +#endif + ); CG_SET_FILL_COLOR (context, fg); CGContextFillRect (context, CGRectMake (0, 0, width, height)); -- 2.30.2